//
// Buttons
// --------------------------------------------------

// Button
// -------------------------

.btn {
	text-shadow: none;
	#reset .boxShadow();
	&.active, &:active {
		outline: 0;
		background-color: #fff; 
	}
	&:hover {
		&.text-primary { 
			background-color: @primaryColor; 
			.fa { color:#fff; }
		}
	}
	&.btn-sm { font-size: 13px;}
}

.btn-block { width: 100%; min-height:30px; }
.btn-group { 
	.btn + .btn:not(.btn-block) { margin-left: -1px; } 
}

// Default
// -------------------------

.btn-default {
	background: #fff;
	border-color: #e7e7e7;
	color:#797979;
	&.filled {
		background: lighten(#e7e7e7,3%);
		i {color:#ccc;}

	}
}

.btn-group.open .btn-default.dropdown-toggle,
.btn-default.disabled, .btn-default[disabled],
.btn-default:hover, .btn-default:focus { background: lighten(#000, 98%); border-color: darken(#e7e7e7,10%); }
.btn-default:active, .btn-default.active { background: #e8e8e8; color: #797979; text-shadow: none; }
.btn-default .caret { border-top-color: rgba(0,0,0,.5); }

// Warning
// -------------------------

.btn-warning {
	background: @warningColor;
	border-color: @warningColor;
	color: #ffffff;
	&.btn-stroke {
		background: none;
		color: @warningColor;
	}
}
.btn-group.open .btn-warning.dropdown-toggle,
.btn-warning.disabled, .btn-warning[disabled],
.btn-warning:hover, .btn-warning:focus,
.btn-warning:active, .btn-warning.active { background: none; color: @warningColor; }
.btn-warning.btn-stroke:hover, .btn-warning.btn-stroke:focus,
.btn-warning.btn-stroke:active, .btn-warning.btn-stroke.active { background: @warningColor; color: #fff; }
.btn-warning .caret { border-top-color: rgba(255,255,255,.7); border-bottom-color: rgba(255,255,255,.7); }

// Info
// -------------------------

.btn-info {
	background: @infoColor;
	border-color: @infoColor;
	color: #ffffff;
	&.btn-stroke {
		background: none;
		color: @infoColor;
	}
}
.btn-group.open .btn-info.dropdown-toggle,
.btn-info.disabled, .btn-info[disabled],
.btn-info:hover, .btn-info:focus,
.btn-info:active, .btn-info.active { background: none; color: @infoColor; }
.btn-info.btn-stroke:hover, .btn-info.btn-stroke:focus,
.btn-info.btn-stroke:active, .btn-info.btn-stroke.active { background: @infoColor; color: #fff; }
.btn-info .caret { border-top-color: rgba(255,255,255,.7); border-bottom-color: rgba(255,255,255,.7); }

// Danger
// -------------------------

.btn-danger {
	background: @dangerColor;
	border-color: @dangerColor;
	color: #ffffff;
	&.btn-stroke {
		background: none;
		color: @dangerColor;
	}
}
.btn-group.open .btn-danger.dropdown-toggle,
.btn-danger.disabled, .btn-danger[disabled],
.btn-danger:hover, .btn-danger:focus,
.btn-danger:active, .btn-danger.active { background: none; color: @dangerColor; }
.btn-danger.btn-stroke:hover, .btn-danger.btn-stroke:focus,
.btn-danger.btn-stroke:active, .btn-danger.btn-stroke.active { background: @dangerColor; color: #fff; }
.btn-danger .caret { border-top-color: rgba(255,255,255,.7); border-bottom-color: rgba(255,255,255,.7); }

// Primary
// -------------------------

.btn-primary {
	background: @primaryColor;
	border-color: @primaryColor;
	color: #ffffff;
	&.btn-stroke {
		background: none;
		color: @primaryColor;
	}
}
.btn-group.open .btn-primary.dropdown-toggle,
.btn-primary.disabled, .btn-primary[disabled],
.btn-primary:hover, .btn-primary:focus,
.btn-primary:active, .btn-primary.active { background: darken(@primaryColor,10%); border-color: darken(@primaryColor,10%);}
.btn-primary.btn-stroke:hover, .btn-primary.btn-stroke:focus,
.btn-primary.btn-stroke:active, .btn-primary.btn-stroke.active { background: @primaryColor; color: #fff; }
.btn-primary .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; }

// Inverse
// -------------------------

.btn-inverse {
	background: @inverseColor;
	border-color: @inverseColor;
	color: #ffffff;
	&.btn-stroke {
		background: none;
		color: @inverseColor;
	}
}
.btn-group.open .btn-inverse.dropdown-toggle,
.btn-inverse.disabled, .btn-inverse[disabled],
.btn-inverse:hover, .btn-inverse:focus,
.btn-inverse:active, .btn-inverse.active { background: none; color: @inverseColor; }
.btn-inverse.btn-stroke:hover, .btn-inverse.btn-stroke:focus,
.btn-inverse.btn-stroke:active, .btn-inverse.btn-stroke.active { background: @inverseColor; color: #fff; }
.btn-inverse .caret { border-top-color: #fff; border-bottom-color: #fff; }

// Success
// -------------------------

.btn-success {
	background: @successColor;
	border-color: @successColor;
	color: #ffffff;
	&.btn-stroke {
		background: none;
		color: @successColor;
	}
}
.btn-group.open .btn-success.dropdown-toggle,
.btn-success.disabled, .btn-success[disabled],
.btn-success:hover, .btn-success:focus,
.btn-success:active, .btn-success.active { background: none; color: @successColor; }
.btn-success.btn-stroke:hover, .btn-success.btn-stroke:focus,
.btn-success.btn-stroke:active, .btn-success.btn-stroke.active { background: @successColor; color: #fff; }
.btn-success .caret { border-top-color: #fff; border-bottom-color: #fff; }

// Button groups
// -------------------------

.btn-group {
	.btn-primary {
		&:not(.dropdown-toggle),
		&:not('[data-toggle*=""]') { margin-right: 2px; }
	}
	&.dropup { 
		.btn {padding:7px 12px;}
	}
}
.btn-group-vertical.block { display: block; }
.btn-group.btn-group-block {
	display: block;
	@media (min-width: 992px) and (max-width: 1200px){
		.btn.col-md-12 {
			&:first-of-type { .rounded(3px, 3px, 0, 0); }
			&:last-of-type { .rounded(0,0, 3px, 3px); }
			margin: 0;
		}
	}
}

// Button icon stacked
// -------------------------

.btn-icon-stacked {
	text-align: left;
	padding: 10px 10px 10px 45px;
	position: relative;
	i {
		display: block;
		position: absolute;
		left: 15px;
		top: 12px;
	}
	span { 
		display: block; 
		font-size: 13px;
		line-height: normal;
	}
}

.btn-circle {
	.rounded(50%, 50%, 50%, 50%);
	&.btn {
		padding-left: 0;
		padding-right: 0;
		width: 34px;
	}
}

// Glyphicons
// -------------------------

.glyphicons, .glyphicons-social  {
	&.standard {
		width: 24px;
		height: 24px;
		padding: 0;
		i {
			display: block;
			height: 24px;
			&:before { color: #64625f; position: relative; top: auto; left: auto; }
		}
		&:not(.disabled):hover { i:before { color: #797979; } }
		&.btn { 
			padding: 4px;
			&.btn-small { padding: 2px 5px; width: auto; height: auto; i:before { top: auto; line-height: 22px; } } 
		}
	}
	&.btn-action {
		width: 25px;
		height: 25px;
		padding: 0;
		border-width: 1px;
		border-style: solid;
		vertical-align: middle;
		i:before {
			font-size: 14px;
			top: 5px;
			left: 5px;
			text-shadow: 0 1px 0 #fff;
			color: #fff;
		}
		&.btn-default i:before { color: #7c7c7c; }
		&.single {
			box-shadow: none;
			-webkit-box-shadow: none;
			-moz-box-shadow: none;
			border: none;
			/*background: none;*/
			margin-right: 10px;
		}
	}
	&.btn-icon {
		text-align: left;
		padding: 5px 7px 5px 40px;
		i {
			float: left;
			&:before { font-size: 15px; top: 0; left: 0; width: 33px; height: 23px; .rounded(3px, 0px, 0px, 3px); vertical-align: middle; padding: 7px 0 0; text-align: center; }
		}
		&.right {
			text-align: left;
			padding: 5px 0 5px 7px;
			i:before { .rounded(0, 3px, 3px, 0); right: 0; left: auto; text-align: center; }
		}
	}
	&.btn-large {
		padding: 10px 10px 10px 40px; font-weight: 700;
		i:before { top: 12px; left: 12px; font-size: 17px; } 
		&.btn-icon {
			i:before { top: 0; left: 0; height: 28px; padding: 12px 0 0; }
		}
	}
	&.btn-small { 
		padding: 2px 10px 2px 35px;
		i:before { padding: 5px 0 0; width: 28px; height: 19px; font-size: 14px; } 
	}
	&.btn-mini { 
		padding: 1px 6px 1px 33px;
		i:before { padding: 5px 0 0; width: 26px; height: 17px; font-size: 13px; } 
	}
	&.orange i:before {
		color: #EDB459;
	}
	&.btn-default i:before { color: #9e9e9e; text-shadow: none; }
	&.single {
		color: @primaryColor;
		padding: 0 0 0 20px;
		i:before { font-size: 13px; top: 4px; color: @primaryColor; }
		+ .single { margin-left: 8px; }
		&.regular {
			color: @bodyText; 
			i:before { 
				color: @bodyText; 
			} 
		}
	}
	&.primary { i:before { color: @primaryColor; } }
	&.text-error { color: @primaryColor; i:before { color: @primaryColor; } }
	&.text-info { color: #5d92b3; i:before { color: #5d92b3; } }
	&.text-success { color: #719d46; i:before { color: #719d46; } }
}